package com.gdqy.FCS.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gdqy.FCS.dao.CollectionDao;
import com.gdqy.FCS.entity.Collection;

@Service
@Transactional
public class CollectionService {
	@Autowired
	private CollectionDao collectionDao;
	
	public List<Collection> selectByUser_id(int user_id){
		return collectionDao.selectByUser_id(user_id);
	}
	
	public Collection selectByUser_idAndObject_idAndObject_type(int user_id,int object_id,String object_type){
		return collectionDao.selectByUser_idAndObject_idAndObject_type(user_id, object_id, object_type);
	}
	public List<Collection> selectByUser_idAndObject_type(int user_id,String object_type){
		return collectionDao.selectByUser_idAndObject_type(user_id, object_type);
	}
	public int insert(Collection collection){
		return collectionDao.insert(collection);
	}
	public int selectCountByUser_id(int user_id){
		return collectionDao.selectCountByUser_id(user_id);
	}
	public Collection selectById(int collection_id){
		return collectionDao.selectById(collection_id);
	}
	public int deleteById(int collection_id){
		return collectionDao.deleteById(collection_id);
	}
	
	public List<Collection> selectWithDesign(int user_id){
		return collectionDao.selectWithDesign(user_id);
	}
	
	public List<Collection> selectWithFabric(int user_id){
		return collectionDao.selectWithFabric(user_id);
	}
	
	public List<Collection> selectWithClothing(int user_id){
		return collectionDao.selectWithClothing(user_id);
	}
	
}
